<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="欠款统计" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="服务人员名称"
                               ng-model="condition.servicePerson">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"><span translate>创建时间</span>：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.startCreateDate"
                               datepicker-popup="{{'yyyy-MM-dd'}}"
                               ng-click="showCreateDateStart = !showCreateDateStart"
                               ng-change="checkDate(condition, 'startCreateDate', 'endCreateDate')"
                               is-open="showCreateDateStart" close-text="关闭" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.endCreateDate"
                               datepicker-popup="{{'yyyy-MM-dd'}}"
                               ng-click="showCreateDateEnd = !showCreateDateEnd"
                               ng-change="checkDate(condition, 'startCreateDate', 'endCreateDate')"
                               is-open="showCreateDateEnd" close-text="关闭" modal-size="small" readonly>
                    </div>
                </div>
            </div>

            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="false"
                 has-check-col="true"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-click="toSort(tableConfig.tableCol, $index)"
                                    ng-show="!!itemCol.isShow">
                                    <div yb-thead-operate ng-model="itemCol"
                                         target-width="tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index"
                                ng-class="{'row-selected': $index === markInfo.curRow}" ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow"
                                    title="{{item[itemCol.dataField]}}">
                                    <div ng-switch="itemCol.type">
                                        <div ng-switch-when="click">
                                            <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)">
                                                {{item[itemCol.dataField]}}
                                            </a>
                                        </div>
                                        <div ng-switch-default>
                                            <span>{{item[itemCol.dataField]}}</span>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="单据详情" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="detailPage.search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                                ng-click="detailPage.switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="detailPage.toolbarConfig.showColConfig" ng-model="detailPage.tableConfig"
                 col-fixed="false"
                 has-check-col="false"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{detailPage.tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in detailPage.tableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}"
                                    ng-click="detailPage.toSort(detailPage.tableConfig.tableCol, $index)"
                                    ng-show="!!itemCol.isShow">
                                    <div yb-thead-operate ng-model="itemCol"
                                         target-width="detailPage.tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="detailPage.dataList.length > 0">
                        <table class="table-fixed border-none" width="{{detailPage.tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in detailPage.dataList track by $index"
                                ng-class="{'row-selected': $index === detailPage.markInfo.curRow}"
                                ng-click="detailPage.selectRow($index)">
                                <td class="spill-dots"
                                    ng-repeat="itemCol in detailPage.tableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow"
                                    title="{{item[itemCol.dataField]}}">
                                    <div ng-switch="itemCol.type">
                                        <div ng-switch-default>
                                            <span>{{item[itemCol.dataField]}}</span>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="detailPage.dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="detailPage.pageInfo" yb-refresh="detailPage.search()"></div>
            </div>
        </div>
        <div tab heading="客户详情" active="activeFlag[2]" ng-if="activeFlag[2]">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="clientInfo.search(1)" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                                ng-click="detailPage.switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="detailPage.toolbarConfig.showColConfig" ng-model="clientTableConfig"
                 col-fixed="false"
                 has-check-col="false"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{clientTableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in clientTableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}"
                                    ng-click="detailPage.toSort(clientTableConfig.tableCol, $index)"
                                    ng-show="!!itemCol.isShow">
                                    <div yb-thead-operate ng-model="itemCol"
                                         target-width="detailPage.tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="clientInfo.dataList.length > 0">
                        <table class="table-fixed border-none" width="{{clientTableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in clientInfo.dataList track by $index">
                                <td class="spill-dots"
                                    ng-repeat="itemCol in clientTableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow" title="{{item[itemCol.dataField]}}">
                                    <div ng-switch="itemCol.type">
                                        <div ng-switch-when="click">
                                            <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)">
                                                {{item[itemCol.dataField]}}
                                            </a>
                                        </div>
                                        <div ng-switch-default>
                                            <span>{{item[itemCol.dataField]}}</span>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="clientInfo.dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="clientPageInfo" yb-refresh="clientInfo.search()"></div>
            </div>
        </div>
    </div>
</div>
